import { tableOption, tableOption1,tableOption2 } from './list_table.config.js'
import search from './../search/search.js';
export default {
    name: "list_table",
    mixins: [search],
    components: {
    },
    data() {
        return {
            tableOption,
            loading: false,
            loadData: [{
                zt: 0
            }, {
                zt: 1
            }],
            pagination: {
                total: 0,
                current: 1,
                pageSize: 10,
                showSizeChanger: true,
                showTotal: total => `共有${total}条`
            },
            btn: [
                // {
                //     title: "新增采购单",
                //     isShow: true
                // },
                {
                    title: "导出",
                    isShow: true
                }
            ],
            selectedRows: [],  //选中的数组

            dialogVisible: false,   //查看明细
            tableOption1,           //配送单
            loading1: false,
            loadData1: [{}],        
            tableOption2,           //采购退货
            loading2: false,
            loadData2: [{}]
        }
    },
    methods: {
        getList(searchForm, page) {
            if (searchForm) {
                console.log(searchForm)
            }
            if (page) {
                this.page.current = page
            }
            setTimeout(() => {
                this.page.total = 200
            }, 500)
        },
        sizeChange(currentPage) {
            this.page.currentPage = currentPage
        },
        currentChange(pageSize) {
            this.page.pageSize = pageSize
        },
        selectionChange(list) {
            this.selectedRows = list
        },
        handler(index) {
            if (index == 0) {
                this.export()
            }
        },
        kucunLs(item) {  //编辑
            this.dialogVisible = true
        },
        export() {

        },
        callback(e){  //查询明细tab
            console.log(e)
        },
        daochuMingxi(){

        }
    }

} 